A Recipe for Raw Types
نویسندگان
چکیده
The design of GJ (Bracha, Odersky, Stoutamire and Wadler), an extension of Java with parametric polymorphism, was significantly affected by the issue of compatibility between legacy Java code and new GJ code. In particular, the introduction of raw types made it easier to interface polymorphic code with monomorphic code. In GJ, for example, a polymorphic class List, parameterized by the element type X, provides not only parameterized types such as List or List but also the raw type List; then, a Java class using List can be compiled without adding element types to where List is used. Raw types, therefore, can reduce (or defer, at least) programmers’ burden of modifying their old Java code to match with new polymorphic code. From the type-theoretic point of view, raw types are close to existential types in the sense that clients using a raw type C expect some implementation of a polymorphic class of the same name C. Unlike ordinary existential types, however, raw types allow several unsafe operations such as coercion from the raw type List, whose element type is abstract, to List for any concrete type T. In this paper, basing on Featherweight GJ, proposed by the authors as a tiny core language of GJ, we formalize a type system and direct reduction semantics of raw types. The bottom type, which is subtype of any type, plays a key role in our type-preserving reduction semantics. In the course of the work, we have found a flaw in the typing rules from the GJ specification; type soundness is proved with respect to a repaired version of the type system.
منابع مشابه
Life cycle assessment of steel production from iron scrap: a case study at a steel plant
Background and Objective: The steel industry is the world's largest consumer of energy. A large amount of iron waste is produced annually, which its use in the steel industry can be economic. The purpose of this study was to investigate the environmental impacts of the steelmaking from iron scrap as a raw material using a life cycle assessment (LCA) method. Materials and Methods: Simapro softw...
متن کاملCorrection: strategies to improve palatability and increase consumption intentions for Momordica charantia (bitter melon): a vegetable commonly used for diabetes management
Corrections to “Recipe development and preparations” Approximately 50 g of uncooked bitter melon per one cup (250 ml) of raw ingredients was added to each dish, except curry dish. The curry dish does not have any other ingredients besides bitter melon and therefore contained approximately 61 g of bitter melon per onehalf cup (125 ml). Each of the raw ingredients in these recipes (except the cur...
متن کاملOptimization for Recipe-based, Diet-planning Inventory Management
This thesis presents a new modeling framework and research methodology for the study of recipe-based, diet-planning inventory management. The thesis begins with an exploration on the classic optimization problem the diet problem based upon mixed-integer linear programming. Then, considering the fact that real diet-planning is sophisticated as it would be planning recipes rather than possible ra...
متن کاملSpatial Analysis in the New Millennium
Econometric theory is like an exquisitely balanced French recipe, spelling out precisely with how many turns to mix the sauce, how many carats of spice to add, and for how many seconds to bake the mixture at exactly 474 degrees of temperature. But when the statistical cook turns to the raw materials, he finds that hearts of cactus fruits are unavailable, so he substitutes cantaloupe; where the ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2001